﻿namespace MailChimp

open System
open MailChimp.Types

//==================================================================================
//  MCApi class
//==================================================================================

[<Sealed>]
/// <summary>MailChimp API wrapper.</summary>
type MCApi =
    inherit ApiBase

    new : apiKey:string * secure:bool -> MCApi

    //------------------------------------------------------------------------------
    //  (*) Custom API call
    //------------------------------------------------------------------------------

    /// <summary>Executes a custom call to the MailChimp server.</summary>
    /// <param name="methodName">Method name.</param>
    /// <param name="p">[optional] Input data.</param>
    /// <returns>Deserialized result.</returns>
    member CallServer : methodName:string * p:Input opt -> 'T

    //==================================================================================
    //  Security related methods
    //==================================================================================

    /// <summary>Retrieves a list of all MailChimp API Keys for this User.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="user">Your MailChimp user name.</param>
    /// <param name="pwd">Your MailChimp password.</param>
    /// <param name="expired">[optional] Whether or not to include expired keys.
    /// <para>Defaults to false.</para></param>
    /// <returns>A list of API keys.</returns>
    member ApiKeys : user:string * pwd:string * expired:bool opt -> MCList<Security.ApiKey>

    /// <summary>Retrieves a list of all MailChimp API Keys for this User.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="user">Your MailChimp user name.</param>
    /// <param name="pwd">Your MailChimp password.</param>
    /// <param name="expired">[optional] Whether or not to include expired keys.
    /// <para>Defaults to false.</para></param>
    /// <returns>A list of API keys.</returns>
    member ApiKeys : user:string * pwd:string * ?expired:bool -> MCList<Security.ApiKey>

    /// <summary>Adds an API Key to your account.
    /// MailChimp will generate a new key for you and return it.</summary>
    /// <param name="user">Your MailChimp user name.</param>
    /// <param name="pwd">Your MailChimp password.</param>
    /// <returns>A new API Key that can be immediately used.</returns>
    member ApiKeyAdd : user:string * pwd:string -> string

    /// <summary>Expires a Specific API Key.</summary>
    /// <remarks>If you expire all of your keys,
    /// just visit your API dashboard to create a new one.</remarks>
    /// <param name="user">Your MailChimp user name.</param>
    /// <param name="pwd">Your MailChimp password.</param>
    /// <returns>True if it succeeded, otherwise an error is thrown.</returns>
    member ApiKeyExpire : user:string * pwd:string -> bool

    //==================================================================================
    //  Helper methods
    //==================================================================================

    /// <summary>"Ping" the MailChimp API - a simple method you can call that will
    /// return a constant value as long as everything is good.</summary>
    /// <returns>"Everything's Chimpy!" if everything is ok, otherwise returns an error message.</returns>
    member Ping : unit -> string

    /// <summary>Retrieves lots of account information including payments made,
    /// plan info, some account stats, installed modules, contact info, and more.</summary>
    /// <remarks>No private information like Credit Card numbers is available.</remarks>
    /// <param name="exclude">[params] Allows controlling which extra arrays are returned
    /// since they can slow down calls.</param>
    /// <returns>Record containing the details for the account tied to this API Key.</returns>
    member GetAccountDetails : [<ParamArray>]exclude:Helper.DetailType[] -> Helper.AccountDetails

    /// <summary>Retrieve all domains verification records for an account.</summary>
    /// <returns>Records of domains verification has been attempted for.</returns>
    member GetVerifiedDomains : unit -> MCList<Helper.Domain>

    /// <summary>Returns the current Chimp Chatter messages for an account.</summary>
    /// <returns>A list of chatter messages and properties.</returns>
    member ChimpChatter : unit -> MCList<Helper.ChimpChatterItem>

    /// <summary>Retrieves all List IDs a member is subscribed to.</summary>
    /// <param name="email">The email address to unsubscribe or the email "id" returned from
    /// listMemberInfo, Webhooks, and Campaigns.</param>
    /// <returns>A list of list_ids the member is subscribed to.</returns>
    member ListsForEmail : email:string -> MCList<string>

    /// <summary>Retrieves all Campaigns IDs a member was sent.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="email">The email address to unsubscribe or the email "id" returned from
    /// listMemberInfo, Webhooks, and Campaigns.</param>
    /// <param name="listID">[optional] A list_id to limit the campaigns to</param>
    /// <returns>A list of campaign_ids the member received.</returns>
    member CampaignsForEmail : email:string * listID:string opt -> MCList<string>

    /// <summary>Retrieves all Campaigns IDs a member was sent.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="email">The email address to unsubscribe or the email "id" returned from
    /// listMemberInfo, Webhooks, and Campaigns.</param>
    /// <param name="listID">[optional] A list_id to limit the campaigns to.</param>
    /// <returns>A list of campaign_ids the member received.</returns>
    member CampaignsForEmail : email:string * ?listID:string -> MCList<string>

    /// <summary>Retrieves all Campaigns IDs along with additional data
    /// (verbose) a member was sent.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="email">The email address to unsubscribe or the email "id" returned from
    /// listMemberInfo, Webhooks, and Campaigns.</param>
    /// <param name="listID">[optional] A list_id to limit the campaigns to.</param>
    /// <returns>A list of campaign_ids along with additional data the member received.</returns>
    member CampaignsForEmail2 : email:string * listID:string opt ->
        MCList<Campaign.CampaignsForEmailItem>

    /// <summary>Retrieves all Campaigns IDs along with additional data
    /// (verbose) a member was sent.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="email">The email address to unsubscribe or the email "id" returned from
    /// listMemberInfo, Webhooks, and Campaigns.</param>
    /// <param name="listID">[optional] A list id to limit the campaigns to.</param>
    /// <returns>A list of campaign ids along with additional data the member received.</returns>
    member CampaignsForEmail2 : email:string * ?listID:string ->
        MCList<Campaign.CampaignsForEmailItem>

    /// <summary>Sends your HTML content to have the CSS inlined and
    /// optionally remove the original styles.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="html">Your HTML content.</param>
    /// <param name="stripCss">[optional] Whether you want the
    /// CSS {style} tags stripped from the returned document.
    /// <para>Defaults to false.</para></param>
    /// <returns>Your HTML content with all CSS inlined, just like if MailChimp sent it.</returns>
    member InlineCss : html:string * stripCss:bool opt -> string

    /// <summary>Sends your HTML content to have the CSS inlined and
    /// optionally remove the original styles.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="html">Your HTML content.</param>
    /// <param name="stripCss">[optional] Whether you want the
    /// CSS {style} tags stripped from the returned document.
    /// <para>Defaults to false.</para></param>
    /// <returns>Your HTML content with all CSS inlined, just like if MailChimp sent it.</returns>
    member InlineCss : html:string * ?stripCss:bool -> string

    /// <summary>Convertes HTML content to a text-only format.
    /// <para>You can send: plain HTML, an array of Template content, an existing Campaign id,
    /// or an existing Template Id.</para></summary>
    /// <remarks>This will not save anything to or update any of your lists,
    /// campaigns, or templates.</remarks>
    /// <param name="contentType">The type of content to parse.</param>
    /// <param name="content">The content to use.
    /// <para>For "html" expects a single string value,
    /// "template" expects an array like you send to campaignCreate,
    /// "url" expects a valid and public URL to pull from, "cid" expects a valid Campaign Id,
    /// and "tid" expects a valid Template Id on your account.</para></param>
    /// <returns>The content pass in converted to text.</returns>
    member GenerateText : contentType:Campaign.ContentType * content:obj -> string

    /// <summary>Searches account wide or on a specific list using the specified query terms.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="query">Terms to search on.</param>
    /// <param name="listID">[optional] The list id to limit the search to.</param>
    /// <param name="offset">[optional] The paging offset to use if more than 100 records match.</param>
    /// <returns>Both exact matches and partial matches over a full search.</returns>
    member SearchMembers : query:string * listID:string opt * offset:int opt ->
        Helper.SearchMembersResult

    /// <summary>Searches account wide or on a specific list using the specified query terms.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="query">Terms to search on.</param>
    /// <param name="listID">[optional] The list id to limit the search to.</param>
    /// <param name="offset">[optional] The paging offset to use if more than 100 records match.</param>
    /// <returns>Both exact matches and partial matches over a full search.</returns>
    member SearchMembers : query:string * ?listID:string * ?offset:int -> Helper.SearchMembersResult

    /// <summary>Search all campaigns for the specified query terms.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="query">Terms to search on.</param>
    /// <param name="offset">[optional] The paging offset to use if more than 100 records match.</param>
    /// <param name="snipRange">[optional] By default clear text is returned.
    /// To have the match highlighted (like a strong HTML tag), this parameter must be passed.</param>
    /// <returns>An object containing the total matches and current results.</returns>
    member SearchCampaigns : query:string * offset:int opt * snipRange:(string * string) opt ->
        Helper.SearchCampaignsResult

    /// <summary>Search all campaigns for the specified query terms.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="query">Terms to search on.</param>
    /// <param name="offset">[optional] The paging offset to use if more than 100 records match.</param>
    /// <param name="snipRange">[optional] By default clear text is returned.
    /// To have the match highlighted (like a strong HTML tag), this parameter must be passed.</param>
    /// <returns>An object containing the total matches and current results.</returns>
    member SearchCampaigns : query:string * ?offset:int * ?snipRange:(string * string) ->
        Helper.SearchCampaignsResult

    //==================================================================================
    //  List related methods
    //==================================================================================

    //------------------------------------------------------------------------------
    //  (*) Lists
    //------------------------------------------------------------------------------

    /// <summary>Retrieves all of the lists defined for your user account.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="filters">[optional] A filter object to apply to this query.</param>
    /// <param name="start">[optional] Control paging of lists, start results at this list #.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] Control paging of lists, number of lists to return with each call.
    /// <para>Defaults to 25 (max=100).</para></param>
    /// <param name="sortField">[optional] A sorting parameter e.g. creation date or
    /// display order in the web app.</param>
    /// <param name="sortDir">[optional] Sort direction.<para>Defaults to 'Desc'.</para></param>
    /// <returns>A count of all matching lists and the specific ones for the current page.</returns>
    member Lists : filters:List.Filter opt * start:int opt * limit:int opt *
        sortField:List.SortField opt * sortDir:SortDirection opt -> List.Lists

    /// <summary>Retrieves all of the lists defined for your user account.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="filters">[optional] A filter object to apply to this query.</param>
    /// <param name="start">[optional] Control paging of lists, start results at this list #.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] Control paging of lists, number of lists to return with each call.
    /// <para>Defaults to 25 (max=100).</para></param>
    /// <param name="sortField">[optional] A sorting parameter e.g. creation date or
    /// display order in the web app.</param>
    /// <param name="sortDir">[optional] Sort direction.<para>Defaults to 'Desc'.</para></param>
    /// <returns>A count of all matching lists and the specific ones for the current page.</returns>
    member Lists : ?filters:List.Filter * ?start:int * ?limit:int *
        ?sortField:List.SortField * ?sortDir:SortDirection -> List.Lists

    //------------------------------------------------------------------------------
    //  (*) Activity
    //------------------------------------------------------------------------------

    /// <summary>Access up to the previous 180 days of daily detailed
    /// aggregated activity stats for a given list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of activity items.</returns>
    member ListActivity : listID:string -> MCList<List.ActivityItem>

    /// <summary>Retrieves the locations (countries) that the list's subscribers have been tagged to
    /// based on geocoding their IP address.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of locations.</returns>
    member ListLocations : listID:string -> MCList<List.Location>

    /// <summary>Gets all email addresses that complained about a given campaign.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 500, upper limit set at 1000</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total of all reports and the specific reports reports this page.</returns>
    member ListAbuseReports : listID:string * start:int opt * limit:int opt *
        since:DateTime opt -> List.AbuseReports

    /// <summary>Gets all email addresses that complained about a given campaign.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 500, upper limit set at 1000</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total of all reports and the specific reports reports this page.</returns>
    member ListAbuseReports : listID:string * ?start:int * ?limit:int *
        ?since:DateTime -> List.AbuseReports

    /// <summary>Access the Growth History by Month for a given list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of growth history items.</returns>
    member ListGrowthHistory : listID:string -> MCList<List.GrowthHistoryItem>

    /// <summary>Retrieves the clients that the list's subscribers have been
    /// tagged as being used based on user agents seen.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The desktop and mobile user agents in use on the list.</returns>
    member ListClients : listID:string -> List.Clients

    //------------------------------------------------------------------------------
    //  (*) Interest Groupings/Groups
    //------------------------------------------------------------------------------

    /// <summary>Gets the list of interest groupings for a given list, including the label,
    /// form information, and included groups for each.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of interest groups for the list.</returns>
    member ListInterestGroupings : listID:string -> MCList<List.InterestGrouping>

    /// <summary>Adds a new Interest Grouping.</summary>
    /// <remarks>If interest groups for the List are not yet enabled,
    /// adding the first grouping will automatically turn them on.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="name">The interest grouping to add - grouping names must be unique.</param>
    /// <param name="groupingType">The type of the grouping to add.</param>
    /// <param name="groups">The seq of initial group names to be added.
    /// <para>At least 1 is required and the names must be unique within a grouping.
    /// If the number takes you over the 60 group limit, an error will be thrown.</para></param>
    /// <returns>The new grouping id if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupingAdd : listID:string * name:string *
        groupingType:List.GroupingType * groups:string seq -> int

    /// <summary>Deletes an existing Interest Grouping.</summary>
    /// <remarks>This will permanently delete all contained interest groups and
    /// will remove those selections from all list members.</remarks>
    /// <param name="groupingID">The interest grouping id.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupingDel : groupingID:int -> bool

    /// <summary>Updates an existing Interest Grouping.</summary>
    /// <param name="groupingID">The interest grouping id.</param>
    /// <param name="value">The new value of the field - either string or GroupingType.
    /// <para>Grouping names must be unique - only "hidden" and "checkboxes" grouping types
    /// can be converted between each other.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupingUpdate : groupingID:int * value:obj -> bool

    /// <summary>Adds a single Interest Group.</summary>
    /// <remarks>If interest groups for the List are not yet enabled,
    /// adding the first group will automatically turn them on.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="name">The interest group to add - group names must be unique within a grouping.</param>
    /// <param name="groupingID">[optional] The grouping to add the new group to.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupAdd : listID:string * name:string * groupingID:int opt -> bool

    /// <summary>Adds a single Interest Group.</summary>
    /// <remarks>If interest groups for the List are not yet enabled,
    /// adding the first group will automatically turn them on.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="name">The interest group to add - group names must be unique within a grouping.</param>
    /// <param name="groupingID">[optional] The grouping to add the new group to.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupAdd : listID:string * name:string * ?groupingID:int -> bool

    /// <summary>Deletes a single Interest Group.</summary>
    /// <remarks>If the last group for a list is deleted, this will also turn groups for the list off.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="name">The interest group to delete</param>
    /// <param name="groupingID">[optional] The grouping to delete the group from.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupDel : listID:string * name:string * groupingID:int opt -> bool

    /// <summary>Deletes a single Interest Group.</summary>
    /// <remarks>If the last group for a list is deleted, this will also turn groups for the list off.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="name">The interest group to delete</param>
    /// <param name="groupingID">[optional] The grouping to delete the group from.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupDel : listID:string * name:string * ?groupingID:int -> bool

    /// <summary>Changes the name of an Interest Group.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="oldName">The interest group name to be changed.</param>
    /// <param name="newName">The new interest group name to be set.</param>
    /// <param name="groupingID">[optional] The grouping of the interest group name to be changed.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupUpdate : listID:string * oldName:string *
        newName:string * groupingID:int opt -> bool

    /// <summary>Changes the name of an Interest Group.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="oldName">The interest group name to be changed.</param>
    /// <param name="newName">The new interest group name to be set.</param>
    /// <param name="groupingID">[optional] The grouping of the interest group name to be changed.
    /// <para>If not supplied, the first grouping on the list is used.</para></param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListInterestGroupUpdate : listID:string * oldName:string *
        newName:string * ?groupingID:int -> bool

    //------------------------------------------------------------------------------
    //  (*) Static Segments
    //------------------------------------------------------------------------------

    /// <summary>Retrieves all of the Static Segments for a list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of parameters for each static segment.</returns>
    member ListStaticSegments : listID:string -> MCList<List.StaticSegment>

    /// <summary>Saves a segment against a list for later use.</summary>
    /// <remarks>There is no limit to the number of segments which can be saved.
    /// Static Segments are not tied to any merge data, interest groups, etc. They essentially allow
    /// you to configure an unlimited number of custom segments which will have standard performance.
    /// <para>When using proper segments, Static Segments are one of the available options for
    /// segmentation just as if you used a merge var (and they can be used with other segmentation options),
    /// though performance may degrade at that point.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The id of the new segment, otherwise an error will be thrown.</returns>
    member ListStaticSegmentAdd : listID:string * name:string -> int

    /// <summary>Deletes a static segment.</summary>
    /// <remarks>This will, of course, remove any member affiliations with the segment.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="segID">The id of the static segment to delete.</param>
    /// <returns>True if it worked, otherwise an error is thrown.</returns>
    member ListStaticSegmentDel : listID:string * segID:int -> bool

    /// <summary>Resets a static segment - removes all members from the static segment.</summary>
    /// <remarks>This does not actually affect list member data.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="segID">The id of the static segment to reset.</param>
    /// <returns>True if it worked, otherwise an error is thrown.</returns>
    member ListStaticSegmentReset : listID:string * segID:int -> bool

    /// <summary>Adds list members to a static segment.</summary>
    /// <remarks>It is suggested that you limit batch size to no more than 10,000 addresses per call.
    /// <para>Email addresses must exist on the list in order to be included -
    /// this will not subscribe them to the list!</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="segID">The id of the static segment to modify.</param>
    /// <param name="batch">Email addresses and/or unique_ids to add to the segment.</param>
    /// <returns>The total number of successful updates/errors data.</returns>
    member ListStaticSegmentMembersAdd : listID:string * segID:int * batch:string seq ->
        List.StaticSegmentMembersOpResult

    /// <summary>Removes list members from a static segment.</summary>
    /// <remarks>It is suggested that you limit batch size to no more than 10,000 addresses per call.
    /// <para>Email addresses must exist on the list in order to be included -
    /// this will not unsubscribe them from the list!</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="segID">The id of the static segment to modify.</param>
    /// <param name="batch">Email addresses and/or unique_ids to remove from the segment.</param>
    /// <returns>The total number of successful updates/errors data.</returns>
    member ListStaticSegmentMembersDel : listID:string * segID:int * batch:string seq ->
        List.StaticSegmentMembersOpResult

    //------------------------------------------------------------------------------
    //  (*) Members/Info/Activity
    //------------------------------------------------------------------------------

    /// <summary>Gets all of the list members for a list that are of a particular status.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="status">The status to get members for.</param>
    /// <param name="since">[optional] Pull all members whose status has changed or
    /// whose profile (updated) has changed since this date/time (GMT).</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100, upper limit set at 15000</para></param>
    /// <param name="sortDir">[optional] Sort direction.<para>Defaults to 'Asc'.</para></param>
    /// <returns>The total records match and matching list member data for this page.</returns>
    member ListMembers : listID:string * status:List.MemberStatus * since:DateTime opt *
        start:int opt * limit:int opt * sortDir:SortDirection opt -> List.Members

    /// <summary>Gets all of the list members for a list that are of a particular status.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="status">The status to get members for.</param>
    /// <param name="since">[optional] Pull all members whose status has changed or
    /// whose profile (updated) has changed since this date/time (GMT).</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100, upper limit set at 15000</para></param>
    /// <param name="sortDir">[optional] Sort direction.<para>Defaults to 'Asc'.</para></param>
    /// <returns>The total records match and matching list member data for this page.</returns>
    member ListMembers : listID:string * status:List.MemberStatus * ?since:DateTime *
        ?start:int * ?limit:int * ?sortDir:SortDirection -> List.Members

    /// <summary>Gets all the information for particular member of a list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">Email address or member id to get information for.</param>
    /// <returns>Member's info.</returns>
    member ListMemberInfo : listID:string * email:string -> List.MemberInfo

    /// <summary>Gets all the information for particular member of a list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="emails">A sequence of up to 50 email addresses or members id(s)
    /// to get information for.</param>
    /// <returns>Members info.</returns>
    member ListMemberInfo : listID:string * emails:string seq -> List.MemberInfo

    /// <summary>Gets the most recent 100 activities for particular list members
    /// (open, click, bounce, unsub, abuse, sent to).</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">Email address or member id to get information for.</param>
    /// <returns>Member's activity info.</returns>
    member ListMemberActivity : listID:string * email:string -> List.MemberActivity

    /// <summary>Gets the most recent 100 activities for particular list members
    /// (open, click, bounce, unsub, abuse, sent to).</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="emails">A sequence of up to 50 email addresses or members id(s)
    /// to get information for.</param>
    /// <returns>Members activity info.</returns>
    member ListMemberActivity : listID:string * emails:string seq -> List.MemberActivity

    //------------------------------------------------------------------------------
    //  (*) Subscribe/Unsubscribe
    //------------------------------------------------------------------------------

    /// <summary>Subscribes the provided email to a list.</summary>
    /// <remarks>By default this sends a confirmation email -
    /// you will not see new members until the link contained in it is clicked!
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address to subscribe.</param>
    /// <param name="merges">[optional] Merges for the email.</param>
    /// <param name="options">[optional] Other subscription options.</param>
    /// <returns>True on success, false on failure.</returns>
    member ListSubscribe : listID:string * email:string * merges:List.Merges opt *
        options:List.SubscribeOptions opt -> bool

    /// <summary>Subscribes the provided email to a list.</summary>
    /// <remarks>By default this sends a confirmation email -
    /// you will not see new members until the link contained in it is clicked!
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address to subscribe.</param>
    /// <param name="merges">[optional] Merges for the email.</param>
    /// <param name="options">[optional] Other subscription options.</param>
    /// <returns>True on success, false on failure.</returns>
    member ListSubscribe : listID:string * email:string * ?merges:List.Merges *
        ?options:List.SubscribeOptions -> bool

    /// <summary>Unsubscribes the given email address from the list.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address or member id to unsubscribe.</param>
    /// <param name="options">[optional] Unsubscription options.</param>
    /// <returns>True on success, false on failure.</returns>
    member ListUnsubscribe : listID:string * email:string * options:List.UnsubscribeOptions opt -> bool

    /// <summary>Unsubscribe the given email address from the list.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address or member id to unsubscribe.</param>
    /// <param name="options">[optional] Unsubscription options.</param>
    /// <returns>True on success, false on failure.</returns>
    member ListUnsubscribe : listID:string * email:string * ?options:List.UnsubscribeOptions -> bool

    /// <summary>Edits the email address, merge fields, and interest groups for a list member.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address or member id to update.</param>
    /// <param name="merges">New merges to update the member with.</param>
    /// <param name="emailType">[optional] The email type preference for the member.</param>
    /// <param name="replaceInterests">[optional] Flag to determine whether we replace the interest groups.
    /// <para>Defaults to true.</para></param>
    /// <returns>True on success, false on failure.</returns>
    member ListUpdateMember : listID:string * email:string * merges:List.Merges *
        emailType:List.EmailType opt * replaceInterests:bool opt -> bool

    /// <summary>Edits the email address, merge fields, and interest groups for a list member.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="email">The email address or member id to update.</param>
    /// <param name="merges">New merges to update the member with.</param>
    /// <param name="emailType">[optional] The email type preference for the member.</param>
    /// <param name="replaceInterests">[optional] Flag to determine whether we replace the interest groups.
    /// <para>Defaults to true.</para></param>
    /// <returns>True on success, false on failure.</returns>
    member ListUpdateMember : listID:string * email:string * merges:List.Merges *
        ?emailType:List.EmailType * ?replaceInterests:bool -> bool

    /// <summary>Subscribes a batch of email addresses to a list at once.</summary>
    /// <remarks>Maximum batch sizes vary based on the amount of data in each record,
    /// though you should cap them at 5k - 10k records, depending on your experience.
    /// These calls are also long, so be sure you increase your timeout values.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="batch">A sequence of merges for each email to subscribe.</param>
    /// <param name="options">[optional] Other subscription options.</param>
    /// <returns>Result counts and any errors that occurred.</returns>
    member ListBatchSubscribe : listID:string * batch:List.Merges seq *
        options:List.SubscribeOptions opt -> List.BatchSubscribe

    /// <summary>Subscribes a batch of email addresses to a list at once.</summary>
    /// <remarks>Maximum batch sizes vary based on the amount of data in each record,
    /// though you should cap them at 5k - 10k records, depending on your experience.
    /// These calls are also long, so be sure you increase your timeout values.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="batch">A sequence of merges for each email to subscribe.</param>
    /// <param name="options">[optional] Other subscription options.</param>
    /// <returns>Result counts and any errors that occurred.</returns>
    member ListBatchSubscribe : listID:string * batch:List.Merges seq *
        ?options:List.SubscribeOptions -> List.BatchSubscribe

    /// <summary>Unsubscribes a batch of email addresses to a list.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="batch">A sequence of email addresses to unsubscribe.</param>
    /// <param name="options">[optional] Unsubscription options.</param>
    /// <returns>Result counts and any errors that occurred.</returns>
    member ListBatchUnsubscribe : listID:string * batch:string seq *
        options:List.UnsubscribeOptions opt -> List.BatchUnsubscribe

    /// <summary>Unsubscribes a batch of email addresses to a list.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="batch">A sequence of email addresses to unsubscribe.</param>
    /// <param name="options">[optional] Unsubscription options.</param>
    /// <returns>Result counts and any errors that occurred.</returns>
    member ListBatchUnsubscribe : listID:string * batch:string seq *
        ?options:List.UnsubscribeOptions -> List.BatchUnsubscribe

    //------------------------------------------------------------------------------
    //  (*) Webhooks
    //------------------------------------------------------------------------------

    /// <summary>Returns the Webhooks configured for the given list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of webhooks.</returns>
    member ListWebhooks : listID:string -> MCList<List.Webhook>

    /// <summary>Adds a new Webhook URL for the given list.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="url">A valid URL for the Webhook.
    /// <para>A url may only exist on a list once.</para></param>
    /// <param name="actions">[optional] Actions to fire this Webhook for.</param>
    /// <param name="sources">[optional] Sources to fire this Webhook for.</param>
    /// <returns>True if the call succeeds, otherwise an exception will be thrown.</returns>
    member ListWebhookAdd : listID:string * url:string * actions:List.WebhookActions opt *
        sources:List.WebhookSources opt -> bool

    /// <summary>Adds a new Webhook URL for the given list.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="url">A valid URL for the Webhook.
    /// <para>A url may only exist on a list once.</para></param>
    /// <param name="actions">[optional] Actions to fire this Webhook for.</param>
    /// <param name="sources">[optional] Sources to fire this Webhook for.</param>
    /// <returns>True if the call succeeds, otherwise an exception will be thrown.</returns>
    member ListWebhookAdd : listID:string * url:string * ?actions:List.WebhookActions *
        ?sources:List.WebhookSources -> bool

    /// <summary>Deletes an existing Webhook URL from a given list.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="url">The URL of a Webhook on this list.</param>
    /// <returns>True if the call succeeds, otherwise an exception will be thrown.</returns>
    member ListWebhookDel : listID:string * url:string -> bool

    //------------------------------------------------------------------------------
    //  (*) Merge Vars
    //------------------------------------------------------------------------------

    /// <summary>Gets the list of merge tags for a given list,
    /// including their name, tag, and required setting.</summary>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>The list of merge tags.</returns>
    member ListMergeVars : listID:string -> MCList<List.MergeVar>

    /// <summary>Adds a new merge tag to a given list.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="tag">The merge tag to add, e.g. FNAME.</param>
    /// <param name="name">The long description of the tag being added, used for user displays.</param>
    /// <param name="options">[optional] Various options for this merge var.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListMergeVarAdd : listID:string * tag:string * name:string * options:List.MergeVarOptions opt -> bool

    /// <summary>Adds a new merge tag to a given list.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="tag">The merge tag to add, e.g. FNAME.</param>
    /// <param name="name">The long description of the tag being added, used for user displays.</param>
    /// <param name="options">[optional] Various options for this merge var.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListMergeVarAdd : listID:string * tag:string * name:string * ?options:List.MergeVarOptions -> bool

    /// <summary>Deletes a merge tag from a given list and all its members.</summary>
    /// <remarks>The data is removed from all members as well!
    /// On large lists this method may seem a bit slower than calls you typically make.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="tag">The merge tag to delete.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListMergeVarDel : listID:string * tag:string -> bool

    /// <summary>Updates most parameters for a merge tag on a given list.</summary>
    /// <remarks>You cannot currently change the merge type.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListMergeVarUpdate : listID:string * tag:string * options:List.MergeVarOptions -> bool

    /// <summary>Completely resets all data stored in a merge var on a list.</summary>
    /// <remarks>All data is removed and this action can not be undone.</remarks>
    /// <param name="listID">The list id to connect to.</param>
    /// <param name="tag">The merge tag to reset.</param>
    /// <returns>True if the request succeeds, otherwise an error will be thrown.</returns>
    member ListMergeVarReset : listID:string * tag:string -> bool

    //==================================================================================
    //  Campaign related methods
    //==================================================================================

    //------------------------------------------------------------------------------
    //  (*) Campaigns
    //------------------------------------------------------------------------------

    /// <summary>Gets the list of campaigns and their details matching the specified filters.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="filters">[optional] A filter object to apply to this query.</param>
    /// <param name="start">[optional] Control paging of campaigns, start results at this campaign #.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] Control paging of campaigns, number of lists to return with each call.
    /// <para>Defaults to 25 (max=1000).</para></param>
    /// <returns>A count of all matching campaigns and the specific ones for the current page.</returns>
    member Campaigns : filters:Campaign.Filter opt * start:int opt * limit:int opt -> Campaign.Campaigns

    /// <summary>Gets the list of campaigns and their details matching the specified filters.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="filters">[optional] A filter object to apply to this query.</param>
    /// <param name="start">[optional] Control paging of campaigns, start results at this campaign #.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] Control paging of campaigns, number of lists to return with each call.
    /// <para>Defaults to 25 (max=1000).</para></param>
    /// <returns>A count of all matching campaigns and the specific ones for the current page.</returns>
    member Campaigns : ?filters:Campaign.Filter * ?start:int * ?limit:int -> Campaign.Campaigns

    //------------------------------------------------------------------------------
    //  (*) Create/Delete
    //------------------------------------------------------------------------------

    /// <summary>Creates a new draft campaign to send.</summary>
    /// <remarks>You can not have more than 32,000 campaigns in your account.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignType">The Campaign Type to create.</param>
    /// <param name="options">The standard options for this campaign.</param>
    /// <param name="content">The content for this campaign.</param>
    /// <param name="segmentOpts">[optional] Segmentation options of this campaign.</param>
    /// <param name="typeOpts">[optional] Type options for this campaign.</param>
    /// <returns>The ID for the created campaign.</returns>
    member CampaignCreate : campaignType:Campaign.Type * options:Campaign.Options * content:Campaign.Content.Base *
        segmentOpts:Campaign.SegmentOptions opt * typeOpts:Campaign.TypeOptions.Base opt -> string

    /// <summary>Creates a new draft campaign to send.</summary>
    /// <remarks>You can not have more than 32,000 campaigns in your account.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="campaignType">The Campaign Type to create.</param>
    /// <param name="options">The standard options for this campaign.</param>
    /// <param name="content">The content for this campaign.</param>
    /// <param name="segmentOpts">[optional] Segmentation options of this campaign.</param>
    /// <param name="typeOpts">[optional] Type options for this campaign.</param>
    /// <returns>The ID for the created campaign.</returns>
    member CampaignCreate : campaignType:Campaign.Type * options:Campaign.Options * content:Campaign.Content.Base *
        ?segmentOpts:Campaign.SegmentOptions * ?typeOpts:Campaign.TypeOptions.Base -> string

    /// <summary>Deletes a campaign.</summary>
    /// <param name="campaignID">The Campaign ID to delete.</param>
    /// <returns>True if the delete succeeds, otherwise an error will be thrown.</returns>
    member CampaignDelete : campaignID:string -> bool

    /// <summary>Replicates a campaign.</summary>
    /// <param name="campaignID">The Campaign ID to replicate.</param>
    /// <returns>The id of the replicated Campaign created, otherwise an error will be thrown.</returns>
    member CampaignReplicate : campaignID:string -> string

    /// <summary>Updates just about any setting for a campaign that has not been sent.</summary>
    /// <param name="campaignID">The Campaign ID to update.</param>
    /// <param name="name">The parameter name to update.</param>
    /// <param name="value">An appropriate value for the parameter.</param>
    /// <returns>True if the update succeeds, otherwise an error will be thrown.</returns>
    member CampaignUpdate : campaignID:string * name:string * value:obj -> bool

    //------------------------------------------------------------------------------
    //  (*) Send/Schedule
    //------------------------------------------------------------------------------

    /// <summary>Allows one to test their segmentation rules before creating a campaign using them.</summary>
    /// <param name="listID">The list to test segmentation on.</param>
    /// <param name="options">Segmentation options.</param>
    /// <returns>The total number of subscribers matching your segmentation options.</returns>
    member CampaignSegmentTest : listID:string * options:Campaign.SegmentOptions -> int

    /// <summary>Pauses an AutoResponder or RSS campaign from sending.</summary>
    /// <param name="campaignID">The Campaign ID to pause.</param>
    /// <returns>True on success.</returns>
    member CampaignPause : campaignID:string -> bool

    /// <summary>Resumes sending an AutoResponder or RSS campaign.</summary>
    /// <param name="campaignID">The Campaign ID to resume sending of.</param>
    /// <returns>True on success.</returns>
    member CampaignResume : campaignID:string -> bool

    /// <summary>Schedules a campaign to be sent in the future.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to schedule.</param>
    /// <param name="scheduleTime">The time (GMT) to schedule the campaign.</param>
    /// <param name="scheduleTimeB">[optional] The time (GMT) to schedule Group B
    /// of an A/B Split 'schedule' campaign.</param>
    /// <returns>True on success.</returns>
    member CampaignSchedule : campaignID:string * scheduleTime:DateTime *
        scheduleTimeB:DateTime opt -> bool

    /// <summary>Schedules a campaign to be sent in the future.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to schedule.</param>
    /// <param name="scheduleTime">The time (GMT) to schedule the campaign.</param>
    /// <param name="scheduleTimeB">[optional] The time (GMT) to schedule Group B
    /// of an A/B Split 'schedule' campaign.</param>
    /// <returns>True on success.</returns>
    member CampaignSchedule : campaignID:string * scheduleTime:DateTime *
        ?scheduleTimeB:DateTime -> bool

    /// <summary>Schedule a campaign to be sent in batches sometime in the future.</summary>
    /// <remarks>Only valid for 'regular' campaigns.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to schedule.</param>
    /// <param name="scheduleTime">The time (GMT) to schedule the campaign.</param>
    /// <param name="numBatches">[optional] The number of batches between 2 and 26 to send.
    /// <para>Defaults to 2.</para></param>
    /// <param name="staggerMins">[optional] The number of minutes between each batch -
    /// 5, 10, 15, 20, 25, 30, or 60.<para>Defaults to 5.</para></param>
    /// <returns>True on success.</returns>
    member CampaignScheduleBatch : campaignID:string * scheduleTime:DateTime *
        numBatches:int opt * staggerMins:int opt -> bool

    /// <summary>Schedule a campaign to be sent in batches sometime in the future.</summary>
    /// <remarks>Only valid for 'regular' campaigns.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to schedule.</param>
    /// <param name="scheduleTime">The time (GMT) to schedule the campaign.</param>
    /// <param name="numBatches">[optional] The number of batches between 2 and 26 to send.
    /// <para>Defaults to 2.</para></param>
    /// <param name="staggerMins">[optional] The number of minutes between each batch -
    /// 5, 10, 15, 20, 25, 30, or 60.<para>Defaults to 5.</para></param>
    /// <returns>True on success.</returns>
    member CampaignScheduleBatch : campaignID:string * scheduleTime:DateTime *
        ?numBatches:int * ?staggerMins:int -> bool

    /// <summary>Unschedules a campaign that is scheduled to be sent in the future.</summary>
    /// <param name="campaignID">The Campaign ID to unschedule.</param>
    /// <returns>True on success.</returns>
    member CampaignUnschedule : campaignID:string -> bool

    /// <summary>Sends a given campaign immediately. For RSS campaigns, this will 'start' them.</summary>
    /// <param name="campaignID">The Campaign ID to send.</param>
    /// <returns>True on success.</returns>
    member CampaignSendNow : campaignID:string -> bool

    /// <summary>Sends a test of this campaign to the provided email address.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to send.</param>
    /// <param name="emails">A sequence of email address to receive the test message.</param>
    /// <param name="sendType">[optional] The email format (html/text).
    /// <para>By default both formats are sent.</para></param>
    /// <returns>True on success.</returns>
    member CampaignSendTest : campaignID:string * emails:string seq *
        sendType:Campaign.TestEmailType opt -> bool

    /// <summary>Sends a test of this campaign to the provided email address.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to send.</param>
    /// <param name="emails">A sequence of email address to receive the test message.</param>
    /// <param name="sendType">[optional] The email format (html/text).
    /// <para>By default both formats are sent.</para></param>
    /// <returns>True on success.</returns>
    member CampaignSendTest : campaignID:string * emails:string seq *
        ?sendType:Campaign.TestEmailType -> bool

    //------------------------------------------------------------------------------
    //  (*) Misc
    //------------------------------------------------------------------------------

    /// <summary>Gets the content (both html and text) for a campaign either as it would appear
    /// in the campaign archive or as the raw, original content.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get content for.</param>
    /// <param name="forArchive">[optional] Controls whether we return the
    /// Archive version (true) or the Raw version (false).<para>Defaults to true.</para></param>
    /// <returns>All content for the campaign.</returns>
    member CampaignContent : campaignID:string * forArchive:bool opt -> Campaign.Content.Html

    /// <summary>Gets the content (both html and text) for a campaign either as it would appear
    /// in the campaign archive or as the raw, original content.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get content for.</param>
    /// <param name="forArchive">[optional] Controls whether we return the
    /// Archive version (true) or the Raw version (false).<para>Defaults to true.</para></param>
    /// <returns>All content for the campaign.</returns>
    member CampaignContent : campaignID:string * ?forArchive:bool -> Campaign.Content.Html

    /// <summary>Gets the HTML template content sections for a campaign.</summary>
    /// <param name="campaignID">The Campaign ID to get content for.</param>
    /// <returns>All content section for the campaign.</returns>
    member CampaignTemplateContent : campaignID:string -> Campaign.Content.Template

    /// <summary>Gets the URL to a customized VIP Report for the specified campaign and
    /// optionally send an email to someone with links to it.</summary>
    /// <remarks>Subsequent calls will overwrite anything already set for the same campign (eg, the password).
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to share a report for.</param>
    /// <param name="options">[optional] Various parameters which can be used to configure the shared report</param>
    /// <returns>Details for the shared report.</returns>
    member CampaignShareReport : campaignID:string * options:Campaign.ShareReportOptions opt ->
        Campaign.ShareReport

    /// <summary>Gets the URL to a customized VIP Report for the specified campaign and
    /// optionally send an email to someone with links to it.</summary>
    /// <remarks>Subsequent calls will overwrite anything already set for the same campign (eg, the password).
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to share a report for.</param>
    /// <param name="options">[optional] Various parameters which can be used to configure the shared report</param>
    /// <returns>Details for the shared report.</returns>
    member CampaignShareReport : campaignID:string * ?options:Campaign.ShareReportOptions ->
        Campaign.ShareReport

    /// <summary>Attaches Ecommerce Order Information to a Campaign.</summary>
    /// <remarks>This will generally be used by ecommerce package plugins
    /// provided by us or by 3rd part system developers.</remarks>
    /// <param name="order">Information pertaining to the order that has completed.</param>
    /// <returns>True if the data is saved, otherwise an error is thrown.</returns>
    member CampaignEcommOrderAdd : order:Ecommerce.Order -> bool

    //==================================================================================
    //  Campaign stats related methods
    //==================================================================================

    /// <summary>Given a list and a campaign, gets all the relevant campaign statistics.</summary>
    /// <param name="campaignID">The Campaign ID to pull stats for.</param>
    /// <returns>The statistics for this campaign.</returns>
    member CampaignStats : campaignID:string -> Campaign.Stats.Stats

    /// <summary>Gets all email addresses that complained about a given campaign.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull abuse reports for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 500 (max=1000).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The list ofthe abuse reports for this campaign.</returns>
    member CampaignAbuseReports : campaignID:string * start:int opt * limit:int opt *
        since:DateTime opt -> MCList<Campaign.Stats.AbuseReport>

    /// <summary>Gets all email addresses that complained about a given campaign.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull abuse reports for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 500 (max=1000).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The list ofthe abuse reports for this campaign.</returns>
    member CampaignAbuseReports : campaignID:string * ?start:int * ?limit:int *
        ?since:DateTime -> MCList<Campaign.Stats.AbuseReport>

    /// <summary>Gets all email addresses the campaign was successfully sent to.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull members for.</param>
    /// <param name="status">[optional] The status to pull .
    /// <para>By default, all records are returned.</para></param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>A total of all matching emails and the specific emails for this page.</returns>
    member CampaignMembers : campaignID:string * status:Campaign.Stats.SendStatus opt *
        start:int opt * limit:int opt -> Campaign.Stats.Members

    /// <summary>Gets all email addresses the campaign was successfully sent to.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull members for.</param>
    /// <param name="status">[optional] The status to pull .
    /// <para>By default, all records are returned.</para></param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>A total of all matching emails and the specific emails for this page.</returns>
    member CampaignMembers : campaignID:string * ?status:Campaign.Stats.SendStatus *
        ?start:int * ?limit:int -> Campaign.Stats.Members

    /// <summary>Retrieves the text presented in our app for how a campaign performed and
    /// any advice we may have for you - best suited for display in customized reports pages.</summary>
    /// <remarks>Some messages will contain HTML - clean tags as necessary.</remarks>
    /// <param name="campaignID">The Campaign ID to pull advice text for.</param>
    /// <returns>The list of advice messages.</returns>
    member CampaignAdvice : campaignID:string -> MCList<Campaign.Stats.Advice>

    /// <summary>Retrieves the Google Analytics data we've collected for this campaign.</summary>
    /// <remarks>Requires Google Analytics Add-on to be installed and configured.</remarks>
    /// <param name="campaignID">The Campaign ID to pull bounces for.</param>
    /// <returns>Analytics for the passed campaign.</returns>
    member CampaignAnalytics : campaignID:string -> Campaign.Stats.Analytics

    /// <summary>Retrieves the most recent full bounce message for a specific
    /// email address on the given campaign.</summary>
    /// <remarks>Messages over 30 days old are subject to being removed.</remarks>
    /// <param name="campaignID">The Campaign ID to pull bounces for.</param>
    /// <param name="email">The email address or unique id of the member to pull a bounce message for.</param>
    /// <returns>The full bounce message for this email+campaign along with some extra data.</returns>
    member CampaignBounceMessage : campaignID:string * email:string -> Campaign.Stats.BounceMessage

    /// <summary>Retrieves the full bounce messages for the given campaign.</summary>
    /// <remarks>This can return very large amounts of data depending on how large the campaign was and how
    /// much cruft the bounce provider returned. Also, message over 30 days old are subject to being removed.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to pull bounces for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 25 (max=50).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The full bounce messages for this campaign along.</returns>
    member CampaignBounceMessages : campaignID:string * start:int opt * limit:int opt *
        since:DateTime opt -> Campaign.Stats.BounceMessages

    /// <summary>Retrieves the full bounce messages for the given campaign.</summary>
    /// <remarks>This can return very large amounts of data depending on how large the campaign was and how
    /// much cruft the bounce provider returned. Also, message over 30 days old are subject to being removed.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to pull bounces for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 25 (max=50).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The full bounce messages for this campaign along.</returns>
    member CampaignBounceMessages : campaignID:string * ?start:int * ?limit:int *
        ?since:DateTime -> Campaign.Stats.BounceMessages

    /// <summary>Gets a list of the urls being tracked, and their click counts for a given campaign.</summary>
    /// <param name="campaignID">The Campaign ID to pull stats for.</param>
    /// <returns>The dict of urls and their associated statsistics.</returns>
    member CampaignClickStats : campaignID:string -> MCDict<string,Campaign.Stats.ClickStats>

    /// <summary>Retrieves the tracked eepurl mentions on Twitter.</summary>
    /// <param name="campaignID">The Campaign ID to pull stats for.</param>
    /// <returns>Tweets, clicks, and referrers related to using the campaign's eepurl.</returns>
    member CampaignEepUrlStats : campaignID:string -> Campaign.Stats.EepUrlStats

    /// <summary>Gets the top 5 performing email domains for this campaign.</summary>
    /// <param name="campaignID">The Campaign ID to pull email domain performance for.</param
    /// <returns>The list of email domains and their associated stats.</returns>
    member CampaignEmailDomainPerformance : campaignID:string ->
        MCList<Campaign.Stats.EmailDomainPerformance>

    /// <summary>Retrieves the countries and number of opens tracked for each.</summary>
    /// <remarks>Email address are not returned.</remarks>
    /// <param name="campaignID">The Campaign ID to pull geo opens for.</param>
    /// <returns>The list of countries where opens occurred.</returns>
    member CampaignGeoOpens : campaignID:string -> MCList<Campaign.Stats.GeoOpens>

    /// <summary>Retrieves the countries and number of opens tracked for each.</summary>
    /// <remarks>Email address are not returned.</remarks>
    /// <param name="campaignID">The Campaign ID to pull geo opens for.</param>
    /// <param name="countryCode">An ISO3166 2 digit country code.</param>
    /// <returns>The list of of regions within the provided country where opens occurred.</returns>
    member CampaignGeoOpensForCountry : campaignID:string * countryCode:string ->
        MCList<Campaign.Stats.GeoOpens>

    /// <summary>Gets all unsubscribed email addresses for a given campaign.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull unsubsribes for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total of all unsubscribed emails and the specific emails for this page.</returns>
    member CampaignUnsubscribes : campaignID:string * start:int opt * limit:int opt ->
        Campaign.Stats.Unsubscribes

    /// <summary>Gets all unsubscribed email addresses for a given campaign.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull unsubsribes for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total of all unsubscribed emails and the specific emails for this page.</returns>
    member CampaignUnsubscribes : campaignID:string * ?start:int * ?limit:int ->
        Campaign.Stats.Unsubscribes

    /// <summary>Retrieves the Ecommerce Orders tracked by campaignEcommOrderAdd().</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull orders for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100 (max=500).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total matching orders and the specific orders for the requested page.</returns>
    member CampaignEcommOrders : campaignID:string * start:int opt * limit:int opt *
        since:DateTime opt -> Ecommerce.Orders

    /// <summary>Retrieves the Ecommerce Orders tracked by campaignEcommOrderAdd().</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to pull orders for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100 (max=500).</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total matching orders and the specific orders for the requested page.</returns>
    member CampaignEcommOrders : campaignID:string * ?start:int * ?limit:int *
        ?since:DateTime -> Ecommerce.Orders

    //==================================================================================
    //  Campaign report data related methods
    //==================================================================================

    /// <summary>Returns the list of email addresses that clicked on a
    /// given url, and how many times they clicked.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get click stats for.</param>
    /// <param name="url">The URL of the link that was clicked on.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page</returns>
    member CampaignClickDetailAIM : campaignID:string *  url:string * start:int opt *
        limit:int opt -> Campaign.ReportData.ClickDetailAIM

    /// <summary>Returns the list of email addresses that clicked on a
    /// given url, and how many times they clicked.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get click stats for.</param>
    /// <param name="url">The URL of the link that was clicked on.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page</returns>
    member CampaignClickDetailAIM : campaignID:string *  url:string * ?start:int *
        ?limit:int -> Campaign.ReportData.ClickDetailAIM

    /// <summary>Given a campaign and email address, returns the entire
    /// click and open history with timestamps, ordered by time.</summary>
    /// <param name="campaignID">The Campaign ID to get stats for.</param>
    /// <param name="emails">A sequence of up to 50 email addresses to check or the email "id".</param>
    /// <returns>The entire click and open history with timestamps, ordered by time.</returns>
    member CampaignEmailStatsAIM : campaignID:string * emails:string seq ->
        Campaign.ReportData.EmailStatsAIM

    /// <summary>Given a campaign and correct paging limits, returns the entire click and open
    /// history with timestamps, ordered by time, for every user a campaign was delivered to.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get stats for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100 (max=1000).</para></param>
    /// <returns>The entire click and open history with timestamps, ordered by time.</returns>
    member CampaignEmailStatsAIMAll : campaignID:string * start:int opt * limit:int opt ->
        Campaign.ReportData.EmailStatsAIMAll

    /// <summary>Given a campaign and correct paging limits, returns the entire click and open
    /// history with timestamps, ordered by time, for every user a campaign was delivered to.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get stats for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100 (max=1000).</para></param>
    /// <returns>The entire click and open history with timestamps, ordered by time.</returns>
    member CampaignEmailStatsAIMAll : campaignID:string * ?start:int * ?limit:int ->
        Campaign.ReportData.EmailStatsAIMAll

    /// <summary>Retrieves the list of email addresses that opened a given campaign
    /// with how many times they opened.</summary>
    /// <remarks>This AIM function is free and does not actually require the AIM module to be installed.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to get opens for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page.</returns>
    member CampaignOpenedAIM : campaignID:string * start:int opt * limit:int opt ->
        Campaign.ReportData.OpenedAIM

    /// <summary>Retrieves the list of email addresses that opened a given campaign
    /// with how many times they opened.</summary>
    /// <remarks>This AIM function is free and does not actually require the AIM module to be installed.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="campaignID">The Campaign ID to get opens for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page.</returns>
    member CampaignOpenedAIM : campaignID:string * ?start:int * ?limit:int ->
        Campaign.ReportData.OpenedAIM

    /// <summary>Retrieves the list of email addresses that did not open a given campaign.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get no opens for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page.</returns>
    member CampaignNotOpenedAIM : campaignID:string * start:int opt * limit:int opt ->
        Campaign.ReportData.NotOpenedAIM

    /// <summary>Retrieves the list of email addresses that did not open a given campaign.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="campaignID">The Campaign ID to get no opens for.</param>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0).</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 1000 (max=15000).</para></param>
    /// <returns>The total records matched and the specific records for this page.</returns>
    member CampaignNotOpenedAIM : campaignID:string * ?start:int * ?limit:int ->
        Campaign.ReportData.NotOpenedAIM

    //==================================================================================
    //  Folder related methods
    //==================================================================================

    /// <summary>Retrieves all the folders for a user account.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>The list of folders.</returns>
    member Folders : folderType:Folder.Type opt -> MCList<Folder.Folder>

    /// <summary>Retrieves all the folders for a user account.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>The list of folders.</returns>
    member Folders : ?folderType:Folder.Type -> MCList<Folder.Folder>

    /// <summary>Adds a new folder to file campaigns or autoresponders in.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="name">A unique name for a folder (max 100 bytes).</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>The id of the newly created folders.</returns>
    member FolderAdd : name:string * folderType:Folder.Type opt -> int

    /// <summary>Adds a new folder to file campaigns or autoresponders in.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="name">A unique name for a folder (max 100 bytes).</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>The id of the newly created folders.</returns>
    member FolderAdd : name:string * ?folderType:Folder.Type -> int

    /// <summary>Deletes a campaign or autoresponder folder.</summary>
    /// <remarks>This will simply make campaigns in the folder appear unfiled, they are not removed.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="folderID">The folder ID to update.</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>True if the delete worked, otherwise an exception is thrown.</returns>
    member FolderDel : folderID:int * folderType:Folder.Type opt -> bool

    /// <summary>Deletes a campaign or autoresponder folder.</summary>
    /// <remarks>This will simply make campaigns in the folder appear unfiled, they are not removed.
    /// <para>F# specific optional parameters.</para></remarks>
    /// <param name="folderID">The folder ID to update.</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>True if the delete worked, otherwise an exception is thrown.</returns>
    member FolderDel : folderID:int * ?folderType:Folder.Type -> bool

    // <summary>Deletes a campaign or autoresponder folder.</summary>
    /// <remarks>This will simply make campaigns in the folder appear unfiled, they are not removed.
    /// <para>C# specific optional parameters.</para></remarks>
    /// <param name="folderID">The folder ID to update.</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>True if the delete worked, otherwise an exception is thrown.</returns>
    member FolderDel : folderID:int * folderType:Folder.Type opt -> bool

    /// <summary>Updates the name of a folder for campaigns or autoresponders.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="folderID">The folder ID to update.</param>
    /// <param name="name">A new, unique name for the folder (max 100 bytes).</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>True if the delete worked, otherwise an exception is thrown.</returns>
    member FolderUpdate : folderID:int * name:string * folderType:Folder.Type opt -> bool

    /// <summary>Updates the name of a folder for campaigns or autoresponders.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="folderID">The folder ID to update.</param>
    /// <param name="name">A new, unique name for the folder (max 100 bytes).</param>
    /// <param name="folderType">[optional] The type of folders to return.
    /// <para>Defaults to "campaign".</para></param>
    /// <returns>True if the delete worked, otherwise an exception is thrown.</returns>
    member FolderUpdate : folderID:int * name:string * ?folderType:Folder.Type -> bool

    //==================================================================================
    //  Template related methods
    //==================================================================================

    /// <summary>Retrieves various templates available in the system,
    /// allowing some thing similar to our template gallery to be created.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="templateTypes">[optional] The types of templates to return.</param>
    /// <param name="inactives">[optional] Options to control how inactive templates
    /// are returned, if at all.</param>
    /// <param name="category">[optional] For Gallery templates only,
    /// limit to a specific template category.</param>
    /// <returns>The matching templates data.</returns>
    member Templates : templateTypes:Template.Types opt * inactives:Template.Inactives opt *
        category:string opt -> Template.Templates

    /// <summary>Retrieves various templates available in the system,
    /// allowing some thing similar to our template gallery to be created.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="templateTypes">[optional] The types of templates to return.</param>
    /// <param name="inactives">[optional] Options to control how inactive templates
    ///  are returned, if at all.</param>
    /// <param name="category">[optional] For Gallery templates only,
    /// limit to a specific template category.</param>
    /// <returns>The matching templates data.</returns>
    member Templates : ?templateTypes:Template.Types * ?inactives:Template.Inactives *
        ?category:string -> Template.Templates

    /// <summary>Creates a new user template, NOT campaign content.
    /// These templates can then be applied while creating campaigns.</summary>
    /// <param name="name">The name for the template - names must be unique and a max of 50 bytes.</param>
    /// <param name="html">A string specifying the entire template to be created.
    /// <para>This is NOT campaign content. They are intended to utilize our template language.</para></param>
    /// <returns>The new template id, otherwise an error is thrown.</returns>
    member TemplateAdd : name:string * html:string -> int

    /// <summary>Deletes (deactivate) a user template.</summary>
    /// <param name="templateID">The id of the user template to delete.</param>
    /// <returns>True if the template was deleted, otherwise an error will be thrown.</returns>
    member TemplateDel : templateID:int -> bool

    /// <summary>Undelete (reactivate) a user template.</summary>
    /// <param name="templateID">The id of the user template to reactivate.</param>
    /// <returns>True if the template was reactivated, otherwise an error will be thrown.</returns>
    member TemplateUndel : templateID:int -> bool

    /// <summary>Pulls details for a specific template to help support editing.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="templateID">The id of the user template to get info for.</param>
    /// <param name="templateType">[optional] The template type to load.
    /// <para>Defaults to user.</para></param>
    /// <returns>Template info to be used when editing.</returns>
    member TemplateInfo : templateID:int * templateType:Template.Type opt -> Template.Info

    /// <summary>Pulls details for a specific template to help support editing.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="templateID">The id of the user template to get info for.</param>
    /// <param name="templateType">[optional] The template type to load.
    /// <para>Defaults to user.</para></param>
    /// <returns>Template info to be used when editing.</returns>
    member TemplateInfo : templateID:int * ?templateType:Template.Type -> Template.Info

    /// <summary>Replaces the content of a user template, NOT campaign content.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="templateID">The id of the user template to update.</param>
    /// <param name="name">[optional] The name for the template -
    /// names must be unique and a max of 50 bytes.</param>
    /// <param name="html">[optional] A string specifying the entire template to be created.
    /// <para>This is NOT campaign content. They are intended to utilize our template language.</para></param>
    /// <returns>True if the template was updated, otherwise an error will be thrown.</returns>
    member TemplateUpdate : templateID:int * name:string opt * html:string opt -> bool

    /// <summary>Replaces the content of a user template, NOT campaign content.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="templateID">The id of the user template to update.</param>
    /// <param name="name">[optional] The name for the template -
    /// names must be unique and a max of 50 bytes.</param>
    /// <param name="html">[optional] A string specifying the entire template to be created.
    /// <para>This is NOT campaign content. They are intended to utilize our template language.</para></param>
    /// <returns>True if the template was updated, otherwise an error will be thrown.</returns>
    member TemplateUpdate : templateID:int * ?name:string * ?html:string -> bool

    //==================================================================================
    //  Ecommerce methods
    //==================================================================================

    /// <summary>Retrieves the Ecommerce Orders for an account.</summary>
    /// <remarks>C# specific optional parameters.</remarks>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100, upper limit set at 500</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total matching orders and the specific orders for the requested page.</returns>
    member EcommOrders : start:int opt * limit:int opt * since:DateTime opt -> Ecommerce.Orders

    /// <summary>Retrieves the Ecommerce Orders for an account.</summary>
    /// <remarks>F# specific optional parameters.</remarks>
    /// <param name="start">[optional] For large data sets, the page number to start at.
    /// <para>Defaults to 1st page of data (page 0)</para></param>
    /// <param name="limit">[optional] For large data sets, the number of results to return.
    /// <para>Defaults to 100, upper limit set at 500</para></param>
    /// <param name="since">[optional] Pull only messages since this time (GMT).</param>
    /// <returns>The total matching orders and the specific orders for the requested page.</returns>
    member EcommOrders : ?start:int * ?limit:int * ?since:DateTime -> Ecommerce.Orders

    /// <summary>Imports Ecommerce Order Information to be used for Segmentation.</summary>
    /// <remarks>This will generally be used by ecommerce package plugins
    /// that MailChimp provides or by 3rd part system developers.</remarks>
    /// <param name="order">Information pertaining to the order that has completed.</param>
    /// <returns>True if the data is saved, otherwise error is thrown.</returns>
    member EcommOrderAdd : order:Ecommerce.Order -> bool

    /// <summary>Deletes Ecommerce Order Information used for segmentation.</summary>
    /// <remarks>This will generally be used by ecommerce package plugins
    /// that MailChimp provides or by 3rd part system developers.</remarks>
    /// <param name="storeID">The store id the order belongs to.</param>
    /// <param name="orderID">The order id (generated by the store) to delete.</param>
    /// <returns>True if the order is deleted, otherwise error is thrown.</returns>
    member EcommOrderDel : storeID:string * orderID:string -> bool

    //==================================================================================
    //  Golden Monkeys methods
    //==================================================================================

    /// <summary>Retrieves all Golden Monkey(s) for an account</summary>
    /// <returns>Golden Monkeys data.</returns>
    member GmonkeyMembers : unit -> MCList<GoldenMonkeys.Member>

    /// <summary>Retrieves all Activity (opens/clicks) for Golden Monkeys over the past 10 days.</summary>
    /// <returns>Golden Monkeys activity data.</returns>
    member GmonkeyActivity : unit -> MCList<GoldenMonkeys.MemberAction>

    /// <summary>Adds Golden Monkey(s).</summary>
    /// <param name="listID">The id of the List to add members to.</param>
    /// <param name="emails">A sequence of email addresses (max 50)
    /// to attempt to flag as Golden Monkeys.</param>
    /// <returns>The number of success and unsuccesfull adds.</returns>
    member GmonkeyAdd : listID:string * emails:string seq -> GoldenMonkeys.MemberOpResult

    /// <summary>Removes Golden Monkey(s).</summary>
    /// <param name="listID">The id of the List to remove members from.</param>
    /// <param name="emails">A sequence of email addresses (max 50)
    /// to attempt to remove from Golden Monkeys.</param>
    /// <returns>The number of success and unsuccesfull deletes.</returns>
    member GmonkeyDel : listID:string * emails:string seq -> GoldenMonkeys.MemberOpResult